package com.yanqu.road.entity.activity.daomu.pvp;

import java.util.ArrayList;
import java.util.List;

/**
 * 宝箱数据
 */
public class DaoMuPvpBoxData {

    /**
     * 宝箱唯一id
     */
    private String uid;

    /**
     * 奖励
     */
    private List<Integer> goodsList = new ArrayList<>();

    /**
     * 坐标信息
     */
    private Coordinate coordinate = new Coordinate();


    /**
     * 下次刷新时间
     */
    private long nextRefreshTime;

    /**
     * 受击次数大于n次死亡
     */
    private int attackCnt;

    public DaoMuPvpBoxData() {

    }

    public String getUid() {
        return uid;
    }

    public void setUid(String uid) {
        this.uid = uid;
    }

    public List<Integer> getGoodsList() {
        return goodsList;
    }

    public void setGoodsList(List<Integer> goodsList) {
        this.goodsList = goodsList;
    }

    public Coordinate getCoordinate() {
        return coordinate;
    }

    public void setCoordinate(Coordinate coordinate) {
        this.coordinate = coordinate;
    }

    public boolean isLive() {
        return attackCnt > 0 && System.currentTimeMillis() >= nextRefreshTime;
    }

    public long getNextRefreshTime() {
        return nextRefreshTime;
    }

    public void setNextRefreshTime(long nextRefreshTime) {
        this.nextRefreshTime = nextRefreshTime;
    }

    public int getAttackCnt() {
        return attackCnt;
    }

    public void setAttackCnt(int attackCnt) {
        this.attackCnt = attackCnt;
    }
}
